package cc.mrbird.febs.moive.controller;

import cc.mrbird.febs.common.controller.BaseController;
import cc.mrbird.febs.common.domain.QueryRequest;
import cc.mrbird.febs.moive.domain.DataAll;
import cc.mrbird.febs.moive.service.DataAllService;
import cc.mrbird.febs.system.domain.User;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.validation.constraints.NotBlank;
import java.util.List;
import java.util.Map;

@Slf4j
@Validated
@RestController
@RequestMapping("dataAll")
@Api(value = "票房记录主表")
public class DataAllController extends BaseController {

    private String message;

    @Autowired
    private DataAllService dataAllService;


    @GetMapping("/hello")
    public String hello(){
        return "helloworld";
    }

    @GetMapping("/{name}")
    @ApiOperation(value = "票房趋势图， 传参 电影名称")
    public List<DataAll> getData(@PathVariable String name) {
        log.info("param name ={}",name);
        List<DataAll> data =  dataAllService.getData(name);
        return data;
    }




}
